Paginate burgs, states, cultures, religions, rivers & routes editors#1469
Open
barrulus wants to merge 1 commit into
Open
Paginate burgs, states, cultures, religions, rivers & routes editors#1469barrulus wants to merge 1 commit into
barrulus wants to merge 1 commit into
Conversation
|
Much needed changes for maps with complex and large numbers of states.Greatly aids performance and quality! |
Render large editor lists 200 rows at a time so they stay responsive on big maps; the States editor in particular was effectively unusable at 1k+ states because it renders a coat-of-arms per row. - Shared pagination/sort helpers in editors.js (getActiveSort, sortDataByActiveHeader, getEditorPage, renderEditorPagination, bindEditorSortReset). - Sorting, footer totals/averages and CSV export operate over the full filtered set; only the current page is rendered and gets row listeners / COA renders. - Search and state/culture filters (burgs) and column sort reset to page 1; pager hidden when the list fits on one page. - The footer pager fills the table width without widening the fit-content dialog. No new HTML/CSS; the pager UI is built in JS.
f5926b4 to
f8045f0
Compare
Owner
|
Good idea, but I don't like the code, has to be "un-vibed". |
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
Author
Use the idea, don't use the code |
✅ Deploy Preview for afmg ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renders large editor lists 200 rows at a time so they stay responsive on big maps. The States editor in particular was effectively unusable at 1k+ states because it renders a coat-of-arms per row; it now renders the COA only for the current page.
What changed
editors.js:getActiveSort,sortDataByActiveHeader,getEditorPage,renderEditorPagination,bindEditorSortReset.applySorting), computes footer totals/averages over the full set, then renders only the current page and drawsPage n of Ncontrols in the footer.randomizeStatesExpansionare guarded against rows that aren't on the current page.fit-contentwidth, so narrow dialogs (e.g. Rivers) don't get an empty gutter.Notes
masterbefore this change.Test plan